Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Thread safety</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Thread_safety"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Thread_safety rootpage-Thread_safety skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Thread safety</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p>In <a href="Multi-threaded" class="mw-redirect" title="Multi-threaded">multi-threaded</a> <a href="Computer_programming" title="Computer programming">computer programming</a>, a function is <b>thread-safe</b> when it can be invoked or accessed concurrently by multiple threads without causing unexpected behavior, <a href="Race_condition" title="Race condition">race conditions</a>, or data corruption.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-:1_2-0" class="reference"><a href="#cite_note-:1-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> As in the multi-threaded context where a program executes several threads simultaneously in a shared <a href="Address_space" title="Address space">address space</a> and each of those threads has access to every other thread's <a href="Computer_storage" class="mw-redirect" title="Computer storage">memory</a>, thread-safe functions need to ensure that all those threads behave properly and fulfill their design specifications without unintended interaction.<sup id="cite_ref-:0_3-0" class="reference"><a href="#cite_note-:0-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p><p>There are various strategies for making thread-safe data structures.<sup id="cite_ref-:0_3-1" class="reference"><a href="#cite_note-:0-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Levels_of_thread_safety">Levels of thread safety</h2></div>
<p>Different vendors use slightly different terminology for thread-safety,<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> but the most commonly used thread-safety terminology are:<sup id="cite_ref-:1_2-1" class="reference"><a href="#cite_note-:1-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li><b>Not thread safe</b>: Data structures should not be accessed simultaneously by different threads.</li>
<li><b>Thread safe, serialization</b>: Uses <b>a single mutex for all resources</b> to guarantee the thread to be free of <a href="Race_condition#Computing" title="Race condition">race conditions</a> when those resources are accessed by multiple threads simultaneously.</li>
<li><b>Thread safe, MT-safe</b>: Uses <b>a mutex for every single resource</b> to guarantee the thread to be free of <a href="Race_condition#Computing" title="Race condition">race conditions</a> when those resources are accessed by multiple threads simultaneously.</li></ul>
<p>Thread safety guarantees usually also include design steps to prevent or limit the risk of different forms of <a href="Deadlock_(computer_science)" title="Deadlock (computer science)">deadlocks</a>, as well as optimizations to maximize concurrent performance. However, deadlock-free guarantees cannot always be given, since deadlocks can be caused by <a href="Callback_(computer_programming)" title="Callback (computer programming)">callbacks</a> and violation of <a href="Architectural_layer" class="mw-redirect" title="Architectural layer">architectural layering</a> independent of the library itself.
</p><p><a href="Library_(computing)" title="Library (computing)">Software libraries</a> can provide certain thread-safety guarantees.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> For example, concurrent reads might be guaranteed to be thread-safe, but concurrent writes might not be. Whether a program using such a library is thread-safe depends on whether it uses the library in a manner consistent with those guarantees.
</p>
<div class="mw-heading mw-heading2"><h2 id="Implementation_approaches">Implementation approaches</h2></div>
<p>Listed are two classes of approaches for avoiding <a href="Race_condition#Computing" title="Race condition">race conditions</a> to achieve thread-safety.
</p><p>The first class of approaches focuses on avoiding shared state and includes:
</p>
<dl><dt><a href="Reentrant_(subroutine)" class="mw-redirect" title="Reentrant (subroutine)">Re-entrancy</a><sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup></dt>
<dd>Writing code in such a way that it can be partially executed by a thread, executed by the same thread, or simultaneously executed by another thread and still correctly complete the original execution. This requires the saving of <a href="State_(computer_science)" title="State (computer science)">state</a> information in variables local to each execution, usually on a stack, instead of in <a href="Static_variable" title="Static variable">static</a> or <a href="Global_variable" title="Global variable">global</a> variables or other non-local state. All non-local states must be accessed through atomic operations and the data-structures must also be reentrant.</dd>
<dt><a href="Thread-local_storage" title="Thread-local storage">Thread-local storage</a></dt>
<dd>Variables are localized so that each thread has its own private copy. These variables retain their values across <a href="Subroutine" class="mw-redirect" title="Subroutine">subroutines</a> and other code boundaries and are thread-safe since they are local to each thread, even though the code which accesses them might be executed simultaneously by another thread.</dd>
<dt><a href="Immutable_object" title="Immutable object">Immutable objects</a></dt>
<dd>The state of an object cannot be changed after construction. This implies both that only read-only data is shared and that inherent thread safety is attained. Mutable (non-const) operations can then be implemented in such a way that they create new objects instead of modifying the existing ones. This approach is characteristic of <a href="Functional_programming" title="Functional programming">functional programming</a> and is also used by the <i>string</i> implementations in Java, C#, and Python. (See <a href="Immutable_object" title="Immutable object">Immutable object</a>.)</dd></dl>
<p>The second class of approaches are synchronization-related, and are used in situations where shared state cannot be avoided:
</p>
<dl><dt><a href="Mutual_exclusion" title="Mutual exclusion">Mutual exclusion</a></dt>
<dd>Access to shared data is <i>serialized</i> using mechanisms that ensure only one thread reads or writes to the shared data at any time. Incorporation of mutual exclusion needs to be well thought out, since improper usage can lead to side-effects like <a href="Deadlock_(computer_science)" title="Deadlock (computer science)">deadlocks</a>, <a href="Livelock" class="mw-redirect" title="Livelock">livelocks</a>, and <a href="Resource_starvation" class="mw-redirect" title="Resource starvation">resource starvation</a>.</dd>
<dt><a href="Linearizability" title="Linearizability">Atomic operations</a></dt>
<dd>Shared data is accessed by using atomic operations which cannot be interrupted by other threads. This usually requires using special <a href="Machine_language" class="mw-redirect" title="Machine language">machine language</a> instructions, which might be available in a <a href="Runtime_library" title="Runtime library">runtime library</a>. Since the operations are atomic, the shared data is always kept in a valid state, no matter how other threads access it. Atomic operations form the basis of many thread locking mechanisms, and are used to implement mutual exclusion primitives.</dd></dl>
<div class="mw-heading mw-heading2"><h2 id="Examples">Examples</h2></div>
<p>In the following piece of <a href="Java_(programming_language)" title="Java (programming language)">Java</a> code, the Java keyword <a href="List_of_Java_keywords#synchronized" title="List of Java keywords">synchronized</a> makes the method thread-safe:
</p>
<div class="mw-highlight mw-highlight-lang-java mw-content-ltr" dir="ltr"><pre><span class="kd">class</span> <span class="nc">Counter</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="kd">private</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>

<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="kd">synchronized</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">inc</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</pre></div>
<p>In the <a href="C_(programming_language)" title="C (programming language)">C programming language</a>, each thread has its own stack. However, a <a href="Static_variable" title="Static variable">static variable</a> is not kept on the stack; all threads share simultaneous access to it. If multiple threads overlap while running the same function, it is possible that a static variable might be changed by one thread while another is midway through checking it. This difficult-to-diagnose <a href="Logic_error" title="Logic error">logic error</a>, which may compile and run properly most of the time, is called a <a href="Race_condition#Software" title="Race condition">race condition</a>. One common way to avoid this is to use another shared variable as a <a href="Lock_(computer_science)" title="Lock (computer science)">"lock" or "mutex"</a> (from <b>mut</b>ual <b>ex</b>clusion).
</p><p>In the following piece of C code, the function is thread-safe, but not reentrant:
</p><p>
</p>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span class="cp">#</span><span class="w"> </span><span class="cp">include</span><span class="w"> </span><span class="cpf">&lt;pthread.h&gt;</span>

<span class="kt">int</span><span class="w"> </span><span class="nf">increment_counter</span><span class="w"> </span><span class="p">()</span>
<span class="p">{</span>
<span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">counter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">pthread_mutex_t</span><span class="w"> </span><span class="n">mutex</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">PTHREAD_MUTEX_INITIALIZER</span><span class="p">;</span>

<span class="w"> </span><span class="c1">// only allow one thread to increment at a time</span>
<span class="w"> </span><span class="n">pthread_mutex_lock</span><span class="p">(</span><span class="o">&amp;</span><span class="n">mutex</span><span class="p">);</span>

<span class="w"> </span><span class="o">++</span><span class="n">counter</span><span class="p">;</span>

<span class="w"> </span><span class="c1">// store value before any other threads increment it further</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">counter</span><span class="p">;</span>

<span class="w"> </span><span class="n">pthread_mutex_unlock</span><span class="p">(</span><span class="o">&amp;</span><span class="n">mutex</span><span class="p">);</span>

<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<p>In the above, <code>increment_counter</code> can be called by different threads without any problem since a mutex is used to synchronize all access to the shared <code>counter</code> variable. But if the function is used in a reentrant interrupt handler and a second interrupt arises while the mutex is locked, the second routine will hang forever. As interrupt servicing can disable other interrupts, the whole system could suffer.
</p><p>The same function can be implemented to be both thread-safe and reentrant using the lock-free <a href="Linearizability" title="Linearizability">atomics</a> in <a href="C%2B%2B11" title="C++11">C++11</a>:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="cp">#</span><span class="w"> </span><span class="cp">include</span><span class="w"> </span><span class="cpf">&lt;atomic&gt;</span>

<span class="kt">int</span><span class="w"> </span><span class="nf">increment_counter</span><span class="w"> </span><span class="p">()</span>
<span class="p">{</span>
<span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">atomic</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="w"> </span><span class="n">counter</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>

<span class="w"> </span><span class="c1">// increment is guaranteed to be done atomically</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">++</span><span class="n">counter</span><span class="p">;</span>

<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">result</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Concurrency_control" title="Concurrency control">Concurrency control</a></li>
<li><a href="Concurrent_data_structure" title="Concurrent data structure">Concurrent data structure</a></li>
<li><a href="Exception_safety" title="Exception safety">Exception safety</a></li>
<li><a href="Priority_inversion" title="Priority inversion">Priority inversion</a></li>
<li><a href="ThreadSafe" title="ThreadSafe">ThreadSafe</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFKerrisk2010" class="citation book cs1">Kerrisk, Michael (2010). <i>The Linux Programing Interface</i>. <a href="No_Starch_Press" title="No Starch Press">No Starch Press</a>. p.&nbsp;699, "Chapter 31: THREADS: THREAD SAFETY AND PER-THREAD STORAGE"</cite><span class="cs1-maint citation-comment"><code class="cs1-code">{{cite book}}</code>: CS1 maint: postscript (link)</span></span>
</li>
<li id="cite_note-:1-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-:1_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:1_2-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFOracle2010" class="citation web cs1">Oracle (2010-11-01). <a rel="nofollow" class="external text" href="https://docs.oracle.com/cd/E37838_01/html/E61057/compat-14994.html#scrolltoc">"Oracle: Thread safety"</a>. Docs.oracle.com<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-10-16</span></span>"A procedure is thread safe when the procedure is logically correct when executed simultaneously by several threads"; "3 level of thread-safe"</cite><span class="cs1-maint citation-comment"><code class="cs1-code">{{cite web}}</code>: CS1 maint: postscript (link)</span></span>
</li>
<li id="cite_note-:0-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-:0_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:0_3-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.oracle.com/cd/E37838_01/html/E61057/compat-14994.html#scrolltoc">"Multithreaded Programming Guide: Chapter 7 Safe and Unsafe Interfaces"</a>. <i>Docs Oracle</i>. <a href="Oracle_Corporation" title="Oracle Corporation">Oracle</a>. November 2020<span class="reference-accessdate">. Retrieved <span class="nowrap">2024-04-30</span></span>; "Thread Safety"</cite><span class="cs1-maint citation-comment"><code class="cs1-code">{{cite web}}</code>: CS1 maint: postscript (link)</span></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.ibm.com/docs/en/i/7.5?topic=safety-api-thread-classifications">"API thread safety classifications"</a>. IBM. 2023-04-11<span class="reference-accessdate">. Retrieved <span class="nowrap">2023-10-09</span></span>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.oracle.com/cd/E37838_01/html/E61057/compat-89113.html#scrolltoc">"MT Safety Levels for Libraries"</a>. <i>Docs Oracle</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2024-05-17</span></span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://doc.qt.io/qt-5/threads-reentrancy.html">"Reentrancy and Thread-Safety | Qt 5.6"</a>. Qt Project<span class="reference-accessdate">. Retrieved <span class="nowrap">2016-04-20</span></span>.</cite></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><cite id="CITEREFJava_Q&amp;A_Experts1999" class="citation web cs1">Java Q&amp;A Experts (20 April 1999). <a rel="nofollow" class="external text" href="https://www.javaworld.com/article/2077373/thread-safe-design-4-20-99.html">"Thread-safe design (4/20/99)"</a>. <i>JavaWorld.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2012-01-22</span></span>.</cite></li>
<li><cite id="CITEREFTutorialsDesk2014" class="citation web cs1">TutorialsDesk (30 Sep 2014). <a rel="nofollow" class="external text" href="http://www.tutorialsdesk.com/2014/09/synchronization-and-thread-safety.html">"Synchronization and Thread Safety Tutorial with Examples in Java"</a>. <i>TutorialsDesk.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2012-01-22</span></span>.</cite></li>
<li><cite id="CITEREFVenners1998" class="citation news cs1">Venners, Bill (1 August 1998). <a rel="nofollow" class="external text" href="https://www.javaworld.com/article/2076747/design-for-thread-safety.html">"Design for thread safety"</a>. <i>JavaWorld.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2012-01-22</span></span>.</cite></li>
<li><cite id="CITEREFSuess2006" class="citation web cs1">Suess, Michael (15 October 2006). <a rel="nofollow" class="external text" href="http://www.thinkingparallel.com/2006/10/15/a-short-guide-to-mastering-thread-safety/">"A Short Guide to Mastering Thread-Safety"</a>. <i>Thinking Parallel</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2012-01-22</span></span>.</cite></li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-04-10" href="https://en.wikipedia.org/wiki/?title=Thread_safety&amp;oldid=1284934519">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>